package com.itbaizhan.shopping_common.result;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* @program: shopping
* @ClassName CodeEnum
* @description: 返回状态码枚举类
* @author: jing
* @create: 2025-06-12 22:33
**/

@Getter
@AllArgsConstructor
public enum CodeEnum {
    // 正常
    SUCCESS(200, "OK"),
    // 系统异常
    SYSTEM_ERROR(500,"系统异常"),
    // 业务异常
    PARAMETER_ERROR(601,"参数异常"),
    //添加商品类型异常
    INSERT_PRODUCT_TYPE_ERROR(602,"3级类型商品不能添加子类型"),
    //删除商品失败异常
    DELETE_PRODUCT_TYPE_ERROR(603,"该类型有子类型，禁止删除"),
    //文件上传异常
    UPLOAD_FILE_ERROR(604,"文件上传异常")
    ;

    private final Integer code;
    private final String message;
}

